package com.weixinli.beans;

import java.io.Serializable;

public class Mood implements Serializable{
	private static final long serialVersionUID = 1L;
	
	private int mid;//心情ID
	private int w_uid;//用户ID
	private String mname;//标题
	private String mtag;//标签
	private String mcontent;//心情内容
	private String mstatus;//是否匿名
	private String mtime;//发表时间
	
	@Override
	public String toString() {
		return "Mood [mid=" + mid + ", w_uid=" + w_uid + ", mname=" + mname
				+ ", mtag=" + mtag + ", mcontent=" + mcontent + ", mstatus="
				+ mstatus + ", mtime=" + mtime + "]";
	}

	public Mood() {
		super();
		// TODO Auto-generated constructor stub
	}

	public Mood(int mid, int w_uid, String mname, String mtag, String mcontent,
			String mstatus, String mtime) {
		super();
		this.mid = mid;
		this.w_uid = w_uid;
		this.mname = mname;
		this.mtag = mtag;
		this.mcontent = mcontent;
		this.mstatus = mstatus;
		this.mtime = mtime;
	}

	public int getMid() {
		return mid;
	}

	public void setMid(int mid) {
		this.mid = mid;
	}

	public int getW_uid() {
		return w_uid;
	}

	public void setW_uid(int w_uid) {
		this.w_uid = w_uid;
	}

	public String getMname() {
		return mname;
	}

	public void setMname(String mname) {
		this.mname = mname;
	}

	public String getMtag() {
		return mtag;
	}

	public void setMtag(String mtag) {
		this.mtag = mtag;
	}

	public String getMcontent() {
		return mcontent;
	}

	public void setMcontent(String mcontent) {
		this.mcontent = mcontent;
	}

	public String getMstatus() {
		return mstatus;
	}

	public void setMstatus(String mstatus) {
		this.mstatus = mstatus;
	}

	public String getMtime() {
		return mtime;
	}

	public void setMtime(String mtime) {
		this.mtime = mtime;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((mcontent == null) ? 0 : mcontent.hashCode());
		result = prime * result + mid;
		result = prime * result + ((mname == null) ? 0 : mname.hashCode());
		result = prime * result + ((mstatus == null) ? 0 : mstatus.hashCode());
		result = prime * result + ((mtag == null) ? 0 : mtag.hashCode());
		result = prime * result + ((mtime == null) ? 0 : mtime.hashCode());
		result = prime * result + w_uid;
		return result;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Mood other = (Mood) obj;
		if (mcontent == null) {
			if (other.mcontent != null)
				return false;
		} else if (!mcontent.equals(other.mcontent))
			return false;
		if (mid != other.mid)
			return false;
		if (mname == null) {
			if (other.mname != null)
				return false;
		} else if (!mname.equals(other.mname))
			return false;
		if (mstatus == null) {
			if (other.mstatus != null)
				return false;
		} else if (!mstatus.equals(other.mstatus))
			return false;
		if (mtag == null) {
			if (other.mtag != null)
				return false;
		} else if (!mtag.equals(other.mtag))
			return false;
		if (mtime == null) {
			if (other.mtime != null)
				return false;
		} else if (!mtime.equals(other.mtime))
			return false;
		if (w_uid != other.w_uid)
			return false;
		return true;
	}
	
	
}
